/*******************************************************************************

Copyright (C) 2018-2024 Qualcomm Technologies International, Ltd.
All Rights Reserved.
Qualcomm Technologies International, Ltd. Confidential and Proprietary.

*******************************************************************************/

/*! \file
 *
 *  \brief BAP BapProfile interface implementation.
 */

/**
 * \addtogroup BAP_PROFILE_PRIVATE
 * @{
 */

#include <string.h>
#include "bap_client_list_container_cast.h"
#include "bap_profile.h"

#ifdef INSTALL_LEA_UNICAST_CLIENT
void *BapGetAttributeHandles(BapProfileHandle profileHandle, uint8 clntProfile)
{
    BapConnection* connection = NULL;
    BAP* bap = bapGetInstance();

    bapClientFindConnectionByCid(bap, profileHandle, &connection);

    if (connection)
    {
        if (clntProfile == BAP_CLIENT_PROFILE_PACS)
        {
            return (void*)GattPacsClientGetHandlesReq(connection->pacs.srvcHndl);
        }
        else if (clntProfile == BAP_CLIENT_PROFILE_ASCS)
        {
            return (void*)GattAscsClientGetHandlesReq(connection->ascs.srvcHndl);
        }
        else if (clntProfile == BAP_CLIENT_PROFILE_BASS)
        {
             return (void*)GattBassClientGetHandlesReq(connection->bass.srvcHndl);
        }
    }
    return NULL;
}
#endif
/**@}*/